<?php
//Leaps Cache @ 2015-04-22 11:25:10
defined('LEAPS_VERSION') or exit('No permission resources.');
error_reporting ( E_ERROR );
$Head = S('common/common');
$CSS_PATH = SKIN_PATH.'default/css/';
$IMG_PATH = SKIN_PATH.'default/images/';
$JS_PATH = SKIN_PATH.'default/js/';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title><?php if(isset($SEO['title']) && !empty($SEO['title'])) { ?><?php echo $SEO['title'];?><?php } ?><?php echo $SEO['site_title'];?>- Powered by YUNCMS</title>
<meta name="keywords" content="<?php echo $SEO['keyword'];?>">
<meta name="description" content="<?php echo $SEO['description'];?>">
<link href="<?php echo  isset($CSS_PATH) ? $CSS_PATH : '';?>reset.css" rel="stylesheet" type="text/css" />
<link href="<?php echo  isset($CSS_PATH) ? $CSS_PATH : '';?>default_blue.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo defined('JS_PATH') ? JS_PATH : '';?>jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="<?php echo defined('JS_PATH') ? JS_PATH : '';?>jquery.sgallery.js"></script>
<script type="text/javascript" src="<?php echo  isset($JS_PATH) ? $JS_PATH : '';?>search_common.js"></script>
</head> 
<body>
<div class="body-top">
    <div class="content">
    <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" yun_action=\"content\" data=\"op=content&tag_md5=3691a2423faf6414326e1185becad8cc&do=position&posid=3&order=id&num=10&cache=3600\"><a href=\"javascript:void(0);\" class=\"admin_piao_edit\">编辑</a>";}$tag_cache_name = md5(implode('&',array('posid'=>'3','order'=>'id',)).'3691a2423faf6414326e1185becad8cc');if(!$data = S($tag_cache_name)){$content_tag = Loader::lib("content:content_tag");if (method_exists($content_tag, 'position')) {$data = $content_tag->position(array('posid'=>'3','order'=>'id','limit'=>'10',));}if(!empty($data)){S('tpl_data/'. $tag_cache_name, $data,3600);}}?>
    		<div id="announ">
                 <ul>
                 <?php $n=1; if(is_array($data)) foreach($data AS $k => $v) { ?>
                      <li><a href="<?php echo $v['url'];?>"><?php echo $v['title'];?></a></li>
                      <?php if(isset($n))$n++;} if(isset($n))unset($n); ?>
                 </ul>
            </div>
     <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
<script type="text/javascript">
$(function(){
	startmarquee('announ',22,1,500,3000);
})
</script>
            <div class="login lh24 blue"><a href="<?php echo defined('SITE_URL') ? SITE_URL : '';?>index.php?app=content&controller=rss" class="rss ib">rss</a>
            <span class="rt"><script type="text/javascript" src="<?php echo  U('member/passport/mini') ;?>"></script></span></div>
    </div>
</div>
<div class="header">
	<div class="logo"><a href="<?php echo defined('SITE_URL') ? SITE_URL : '';?>"><img src="<?php echo  isset($IMG_PATH) ? $IMG_PATH : '';?>logo.jpg" /></a></div>

    <div class="search">
    	<div class="tab" id="search">
			<?php $j=0?>
			<?php $search_model = S('search/search_model');?>
			<?php $n=1;if(is_array($search_model)) foreach($search_model AS $k=>$v) { ?>
			<?php $j++;?>
				<a href="javascript:;" onclick="setmodel(<?php echo $v['typeid'];?>, $(this));" style="outline:medium none;" hidefocus="true" <?php if($j==1 && $typeid=$v['typeid']) { ?> class="on" <?php } ?>><?php echo $v['name'];?></a><?php if($j != count($search_model)) { ?><span> | </span><?php } ?>
			<?php if(isset($n))$n++;} if(isset($n))unset($n); ?>
			<?php unset($j);?>
		</div>

        <div class="bd">
            <form action="<?php echo defined('SITE_URL') ? SITE_URL : '';?>index.php" method="get" target="_blank">
				<input type="hidden" name="app" value="search"/>
				<input type="hidden" name="controller" value="index"/>
				<input type="hidden" name="action" value="init"/>
				<input type="hidden" name="typeid" value="<?php echo  isset($typeid) ? $typeid : '';?>" id="typeid"/>
                <input type="text" class="text" name="q" id="q"/><input type="submit" value="搜 索" class="btn btn-primary btn-sm"/>
            </form>
        </div>
    </div>

    <div class="banner"><script language="javascript" src="<?php echo defined('SITE_URL') ? SITE_URL : '';?>index.php?app=poster&c=index&a=show_poster&id=1"></script></div>
    <div class="bk3"></div>
    <div class="nav-bar">
    	<map>
    	<?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" yun_action=\"content\" data=\"op=content&tag_md5=589d785303c00da4c01a2ff95cc19f16&do=category&catid=0&num=25&order=listorder+ASC\"><a href=\"javascript:void(0);\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = Loader::lib("content:content_tag");if (method_exists($content_tag, 'category')) {$data = $content_tag->category(array('catid'=>'0','order'=>'listorder ASC','limit'=>'25',));}?>
        	<ul class="nav-site">
			<li><a href="<?php echo defined('SITE_URL') ? SITE_URL : '';?>"><span>首页</span></a></li>
			<?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
			<li class="line">|</li>
			<li><a href="<?php echo $r['url'];?>"><span><?php echo $r['catname'];?></span></a></li>
			<?php if(isset($n))$n++;} if(isset($n))unset($n); ?>
            </ul>
        <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
        </map>
    </div> 
	
	<?php if($top_parentid) { ?>
    <div class="subnav">
		<?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" yun_action=\"content\" data=\"op=content&tag_md5=7f921fb1a5603afcafbed6ead9c0c9a3&do=category&catid=%24top_parentid&num=15&order=listorder+ASC\"><a href=\"javascript:void(0);\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = Loader::lib("content:content_tag");if (method_exists($content_tag, 'category')) {$data = $content_tag->category(array('catid'=>$top_parentid,'order'=>'listorder ASC','limit'=>'15',));}?>
			<?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
			<a href="<?php echo $r['url'];?>"><?php echo $r['catname'];?></a><span> | </span>
			<?php if(isset($n))$n++;} if(isset($n))unset($n); ?>
        <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
    	<?php if($modelid) { ?><a href="<?php echo defined('SIE_URL') ? SIE_URL : '';?>index.php?app=content&controller=search&catid=<?php echo  isset($catid) ? $catid : '';?>">搜索</a><?php } ?>
    </div>
	<?php } ?>
</div>
</div>